﻿@model L2C.Models.Administrator.PublishItemModel
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="/Content/script/tinymce/jscripts/tiny_mce/jquery.tinymce.js" type="text/javascript"></script>
<script src="/Content/script/tinymce/jscripts/tiny_mce/tiny_mce_config.js" type="text/javascript"></script>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Publishing_Item</legend>

        @Html.HiddenFor(model => model.ItemId)

              <div class="simplecontentgroup">
            <div class="editor-label">
                @Html.LabelFor(model => model.ProductId, "Product")
            </div>
            <div class="editor-field">
                @Html.DropDownList("ProductId", String.Empty)
                @Html.ValidationMessageFor(model => model.ProductId)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.Title)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Title)
                @Html.ValidationMessageFor(model => model.Title)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.Descriptions)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Descriptions)
                @Html.ValidationMessageFor(model => model.Descriptions)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.ViewerCounter)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.ViewerCounter)
                @Html.ValidationMessageFor(model => model.ViewerCounter)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.SellPrice)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.SellPrice)
                @Html.ValidationMessageFor(model => model.SellPrice)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.DiscountPercent)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.DiscountPercent)
                @Html.ValidationMessageFor(model => model.DiscountPercent)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.ProductPrice)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.ProductPrice)
                @Html.ValidationMessageFor(model => model.ProductPrice)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.StartDate)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.StartDate)
                @Html.ValidationMessageFor(model => model.StartDate)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.EndDate)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.EndDate)
                @Html.ValidationMessageFor(model => model.EndDate)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.BuyerCounter)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.BuyerCounter)
                @Html.ValidationMessageFor(model => model.BuyerCounter)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.MaximumQuantity)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.MaximumQuantity)
                @Html.ValidationMessageFor(model => model.MaximumQuantity)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.CategoryId, "Category Item")
            </div>
            <div class="editor-field">
                @Html.DropDownList("CategoryId", String.Empty)
                @Html.ValidationMessageFor(model => model.CategoryId)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.SmallPicture)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.SmallPicture)
                @Html.ValidationMessageFor(model => model.SmallPicture)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.ShortTitle)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.ShortTitle)
                @Html.ValidationMessageFor(model => model.ShortTitle)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.Image)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Image)
                @Html.ValidationMessageFor(model => model.Image)
            </div>
        </div>
        <div class="richtextcontent">
            <div class="editor-label">
                @Html.LabelFor(model => model.Highlight)
            </div>
            <div class="editor-field">
                @Html.TextAreaFor(model => model.Highlight, new { @Class = "tinymce richtextcontent" })
                @Html.ValidationMessageFor(model => model.Highlight)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.MainContent)
            </div>
            <div class="editor-field">
                @Html.TextAreaFor(model => model.MainContent, new { @Class = "tinymce richtextcontent" })
                @Html.ValidationMessageFor(model => model.MainContent)
            </div>
        </div>
        <div class="clearfix"></div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
